<template>
  <el-card :body-style="{ padding: '0px' }">
    <div style="width: 100%; height: 300px" ref="pie"></div>
  </el-card>
</template>

<script>
import * as echarts from "echarts";
export default {
  mounted() {
    var myChart = echarts.init(this.$refs.pie);
    var option;
    option = {
      tooltip: {
        trigger: "item",
      },
      legend: {},
      series: [
        {
          type: "pie",
          radius: "50%",
          data: [
            { value: 1048, name: "华为" },
            { value: 735, name: "魅族" },
            { value: 580, name: "小米" },
            { value: 484, name: "oppo" },
          ],
        },
      ],
    };

    option && myChart.setOption(option);
  },
};
</script>

<style lang='less' scoped>
</style>